package com.iis.gui.helper;

import java.util.ArrayList;

import javax.swing.table.DefaultTableModel;

import com.iis.entity.Agent;
import com.iis.entity.Client;
import com.iis.entity.Employee;
import com.iis.entity.Salesman;

public class StaffGUIHelper {
	
	public static DefaultTableModel populateData(){
		String col[] = {"Staff ID","Name","Sales Target"};
		DefaultTableModel tableModel = new DefaultTableModel(col, 0);
		
		ArrayList<Salesman> arrStaffs = Salesman.getAll();
		
		for(Salesman staff : arrStaffs){
			tableModel.addRow(staff.toArray());
		}
		
		return tableModel;	
		
	}
	
	

}
